package cn.spring.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import cn.spring.bean.Address;


public interface AddressMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Address record);

    int insertSelective(Address record);

    Address selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Address record);

    int updateByPrimaryKey(Address record);
    
    int addressCount(Integer empId);
    
    List<Address> getAll(Integer empId);
    
    int updateMo(int empId);
    
    Address selectMo(int empId);
    
    @Update("update address set is_mo=0 where emp_id=#{empId}")
    public void updateAllIsmo(@Param("empId")Integer empId);
    
    @Update("update address set is_mo=1 where id=#{id}")
    public void updateIsmoById(@Param("id")Integer id);
}